const TokenKey = 'token'
const UsernameKey = 'username'
const CompanyIdKey = 'companyId'
const User="user"

export function getToken() {
  return window.localStorage.getItem(TokenKey)
}

export function setToken(token) {
  return window.localStorage.setItem(TokenKey, token)
}

export function removeToken() {
  return window.localStorage.removeItem(TokenKey)
}

export function getUsername() {
  return window.localStorage.getItem(UsernameKey)
}


export function setUsername(username) {
  return window.localStorage.setItem(UsernameKey, username)
}

export function removeUsername() {
  return window.localStorage.removeItem(UsernameKey)
}


export function getCompanyId() {
  return window.localStorage.getItem(CompanyIdKey)
}


export function setCompanyId(companyId) {
  return window.localStorage.setItem(CompanyIdKey, companyId)
}

export function removeCompanyId() {
  return window.localStorage.removeItem(CompanyIdKey)
}

export function setCurrentUserInfo(userInfo) {
  return window.localStorage.setItem(User,userInfo)
}

export function getCurrentUserInfo() {
  return window.localStorage.getItem(User)
}